<template>
  <el-dialog :title="!dataForm.id ? '新建' : isEdit ? '详情' : '编辑'" :close-on-click-modal="false" :visible.sync="visible" class="cu-dialog cu-dialog_center" lock-scroll width="800px">
    <el-row :gutter="15" class="">
      <el-form ref="elForm" class="el-form1" :model="dataForm" size="mini" label-width="100px" label-position="right" :rules="rules">
        <el-col :span="24">
          <el-form-item label-width="0">
            <groupTitle content-position="left" content="校区情况"></groupTitle>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="校区品牌" prop="brand">
            <el-select v-model="dataForm.brand" :disabled="isEdit" placeholder="请选择签约品牌" filterable clearable required :style="{ width: '100%' }">
              <el-option :key="item.id" :label="item.fullName" :value="item.enCode" v-for="item in brandOptions" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="校区名称" prop="campusId">
            <el-select v-model="dataForm.id" :disabled="isEdit" placeholder="请选择" filterable clearable required :style="{ width: '100%' }">
              <el-option v-for="(item, index) in campusOptions" :key="index" :label="item.fullName" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="使用面积" prop="usableArea">
            <el-input v-model="dataForm.usableArea" placeholder="请输入" clearable required :style="{ width: '100%' }">
              <template slot="append">
                平米
              </template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="教室数量" prop="classroomCount">
            <el-input v-model="dataForm.classroomCount" placeholder="请输入" clearable required :style="{ width: '100%' }">
              <template slot="append">
                间
              </template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="规划学位" prop="degreeCount">
            <el-input v-model="dataForm.degreeCount" placeholder="请输入" clearable required :style="{ width: '100%' }">
              <template slot="append">
                个
              </template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="宿舍数量" prop="dormitoryCount">
            <el-input v-model="dataForm.dormitoryCount" placeholder="请输入" clearable required :style="{ width: '100%' }">
              <template slot="append">
                间
              </template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="规划床位" prop="bedCount">
            <el-input v-model="dataForm.bedCount" placeholder="请输入" clearable required :style="{ width: '100%' }">
              <template slot="append">
                个
              </template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label-width="0">
            <groupTitle content-position="left" content="设计情况"></groupTitle>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="设计师" prop="designer">
            <user-select v-model="dataForm.designer" placeholder="请选择" clearable required></user-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="装修设计图" prop="floorPlan">
            <custom-upload-fz v-model="dataForm.floorPlan" type="floorPlan" required :fileSize="20" sizeUnit="MB" :limit="9" buttonText="点击上传文件"></custom-upload-fz>
          </el-form-item>
        </el-col>
      </el-form>
    </el-row>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false">取 消</el-button>
      <el-button type="primary" @click="dataFormSubmit()">确 定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export { default } from './index.js'
</script>
<style lang="scss" scoped>
@import url(index.scss);
</style>
